package com.qk.management.mapper;
import com.qk.entity.Activity;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ActivityMapper {

    List<Activity> page(Integer channel, Integer type, Integer status);

    void addActivity(Activity activity);

    @Select("select * from activity where id= #{id}")
    Activity selectId(Integer id);

    void updateActivity(Activity activity);

    @Delete("delete from activity where id= #{id}")
    void deleteActivity(Integer id);

    @Select("select * from activity where type= #{type}")
    List<Activity> selectType(Integer type);

}
